<?php
function str_split_utf8($str) {
	$split=1;
	$array = array();
	for ( $i=0; $i < strlen( $str ); ){
		$value = ord($str[$i]);
		if($value > 127){
			if($value >= 192 && $value <= 223)
			$split=2;
			elseif($value >= 224 && $value <= 239)
			$split=3;
			elseif($value >= 240 && $value <= 247)
			$split=4;
		}else{
			$split=1;
		}
			$key = NULL;
		for ( $j = 0; $j < $split; $j++, $i++ ) {
			$key .= $str[$i];
		}
		array_push( $array, $key );
	}
return $array;

}


function strip_punctuation( $text )
{
	$text_strip = preg_replace("/[0-9]/", "", $text);
	//$text_strip = preg_replace("/[a-zA-Z0-9]/", "", $text);
	$text_strip = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "", $text_strip);
	$text_strip = preg_replace("/\s*/m", "", $text_strip);
	$text_strip = preg_replace("/[\\\.,\";'\:\-\+\/\?]/", "", $text_strip);
	$text_strip = preg_replace('/[\x{2018}-\x{2026}\x{3000}-\x{301e}\x{fe50}-\x{ff1f}]/u','',$text_strip);
	
	return $text_strip;
}

?>